<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Javascript Study</title>
  </head>
  <body>
    <script lang="text/Javascript">

        var ga = 4;
      function f1(){
          var b= 2;
          var c = 'c';
          var d = 'd';
          function f2(){
              b++;
              console.log(b, c);
          }
          function f3(){
              console.log(b);
          }
          return [f2, f3];
      }
      var f=f1();
      f[0]();
      f[1]();
      let regs = /[^a-z|A-Z|0-9|\-|_|\.]/g; // 检测非法字符(用于材质替换,材质刷)
      let url = "https://file.t8tcdn.com/d/flash/2020/09/12/19/20200912197073638651599909566631.jpg?x-oss-process=image/resize,m_fixed,limit_0,w_512,h_512&t=1599909567"
      setInterval(()=>{
        let re =  regs.test(url);
        console.log(re);        
      }, 100);

    </script>
  </body>
</html>
